<?php 
class DocumentAdmin extends Module
{
	function DocumentAdmin($row)
	{
		Module::Module($row);
		
		
		if(User::is_admin())
		{
			$cmd	=	Url::get('cmd');
			
			require_once("forms/DocumentAdmin.php");
			
			switch($cmd)
			{
				case 'delete':
					$this->add_form(new Deletedocument());
					break;
				case 'change':
					$this->add_form(new PublicdocumentForm());
					break;
				
			    case 'add':
					$this->add_form(new AddDocumentForm());
					break;
				
			    case 'edit':
					$this->add_form(new EditDocumentForm());
					break;
				
			    default:
					$this->add_form(new ListdocumentForm());
					break;
			}
		}
		else 
		{
			Url::access_denied();
		}
	}
}
?>